package cn.anosi.entity.auth;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import cn.anosi.entity.BaseEntity;

/**
 * Organization
 * 描述: 组织机构
 * 创建人: 刘彦硕
 * 创建时间: 2017-06-30 15:12:37
 */
@Entity
@Table(name="organization")
public class Organization extends BaseEntity{

	private static final long serialVersionUID = 1L;

	//名称
	private String name;
	//描述
	private String description;
	//图标
	private String icon = " ";
	
	//上级机构
	private Organization parent;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}
	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	@JoinColumn(name="p_id")
	@ManyToOne
	public Organization getParent() {
		return parent;
	}

	public void setParent(Organization parent) {
		this.parent = parent;
	}
}
